import { defineStore } from 'pinia'
import { ref } from 'vue'
export const useChartStore = defineStore(
  'chart',
  // defineStore('userInfo',{})  userInfo就是这个仓库的名称name
  () => {
    // 页面数据 请求参数Id
    const paramsId = ref()
    const setParams = (params) => {
      paramsId.value = params
    }
    // 搜索框数据持久化
    const form = ref()
    const setForm = (formModel) => {
      form.value = formModel
      // console.log('form.value', form.value)
    }
    // 测评报告参数
    const report=ref()
    const setReport = (params) => {
      report.value = params
      console.log('report.value', report.value)
    }

    return { paramsId, form,report, setParams, setForm,setReport }
  },
  {
    persist: true
  }
)
